/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.hauntedhouses.dao;

import cz.muni.fi.pa165.hauntedhouses.entity.Account;

/**
 *
 * @author Siliarus
 */
public interface AccountDAO {
    /**Method for creation of an account.
     *
     * @param acc The account you want to put in the db
     */
    void create (Account acc);
    
    /**Get method which based on given id returns the Account from db
     *
     * @param id the id of an account u want to get from the db
     * @return Account object with given id
     */
    Account get (Long id);
    
    /**
     * Returns list of all accounts filtered by their username, which is given as parametr.
     *
     * @param username username of the accounts we want to search for
     * @return Account which username equals to given String, null otherwise.
     * @throws IllegalArgumentException if given string is either null or empty
     */
    Account findByUsername(String username);
}
